package clang.ir;

import fixedpoint.DataflowException;

/**
 * This class is used for buffer elements
 */
public class Variable extends Node {

    private String name;

    public Variable(String name) {
        this.name = name;
        this.storageClass = StorageClass.EXTERNAL;
    }

    @Override
    public String getRuntimeExpression() throws DataflowException {
        return name;
    }

    @Override
    public boolean runtimeExpressionIsComposite() {
        return false;
    }

    @Override
    public void buildEvaluationIndex(Node parent) {
        evaluationIndex = parent.getEvaluationIndex() + 1;
    }
}
